package com.xiaozhen.quartz.feign;

import com.xiaozhen.common.core.constant.ServiceNameConstants;
import com.xiaozhen.common.core.domain.R;
import com.xiaozhen.common.core.domain.driver.vo.ModbusDriverVo;
import com.xiaozhen.quartz.feign.fallback.DeviceServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/11/17 11:49
 * @description:
 */
@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE,
        fallbackFactory = DeviceServiceFallback.class)
public interface DeviceService {

    /**
     * 根据设备ID查询出所在驱动和属性信息
     * @param deviceId
     * @return
     */
    @GetMapping("/device/getModbusDeviceInfo")
    R<ModbusDriverVo> getModbusDeviceInfo(@RequestParam("deviceId") Long deviceId);
}
